package com.tcgroup.phone.base_core.widget;

import android.content.Context;
import android.view.View;
import android.widget.RelativeLayout;
import android.widget.Scroller;

/**
 * 作者: wangfei
 * 创建时期: 2019-05-30.
 * 包名: com.tcgroup.phone.base_core.widget
 * 类名: HibeautyNew-Android
 */
public class CImageview extends RelativeLayout {

    public Scroller scroller;

    public CImageview(Context context) {
        super(context);
    }




    @Override
    protected void onScrollChanged(int l, int t, int oldl, int oldt) {
        super.onScrollChanged(l, t, oldl, oldt);
    }


    @Override
    public void computeScroll() {
        super.computeScroll();
        if (scroller.computeScrollOffset()){
            ((View)getParent()).scrollTo(scroller.getCurrX(),scroller.getCurrY());

        }
    }
}
